using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_VIPTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_VIPTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_VIPTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_VIP";
			dataTableMapping.ColumnMappings.Add("SalerID", "SalerID");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			dataTableMapping.ColumnMappings.Add("PresentPoint", "PresentPoint");
			dataTableMapping.ColumnMappings.Add("PresentExp", "PresentExp");
			dataTableMapping.ColumnMappings.Add("VIPLevel", "VIPLevel");
			dataTableMapping.ColumnMappings.Add("VIPID", "VIPID");
			dataTableMapping.ColumnMappings.Add("TransCount", "TransCount");
			dataTableMapping.ColumnMappings.Add("TransMoney", "TransMoney");
			dataTableMapping.ColumnMappings.Add("CardID", "CardID");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_VIP] WHERE (([VIPID] = @Original_VIPID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_VIPID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "VIPID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_VIP] ([SalerID], [UserID], [PresentPoint], [TransCount], [TransMoney], [PresentExp], [VIPLevel], [CardID]) VALUES (@SalerID, @UserID, @PresentPoint, @TransCount, @TransMoney, @PresentExp, @VIPLevel, @CardID);\r\nSELECT VIPID, SalerID, UserID, PresentPoint, TransCount, TransMoney, PresentExp, VIPLevel, CardID FROM HLShop_VIP WHERE (VIPID = SCOPE_IDENTITY())";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PresentPoint", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentPoint", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TransCount", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TransCount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TransMoney", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "TransMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PresentExp", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentExp", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@VIPLevel", SqlDbType.Char, 0, ParameterDirection.Input, 0, 0, "VIPLevel", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@CardID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "CardID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_VIP] SET [SalerID] = @SalerID, [UserID] = @UserID, [PresentPoint] = @PresentPoint, [TransCount] = @TransCount, [TransMoney] = @TransMoney, [PresentExp] = @PresentExp, [VIPLevel] = @VIPLevel, [CardID] = @CardID WHERE (([VIPID] = @Original_VIPID));\r\nSELECT VIPID, SalerID, UserID, PresentPoint, TransCount, TransMoney, PresentExp, VIPLevel, CardID FROM HLShop_VIP WHERE (VIPID = @VIPID)";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PresentPoint", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentPoint", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TransCount", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TransCount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TransMoney", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "TransMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PresentExp", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentExp", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@VIPLevel", SqlDbType.Char, 0, ParameterDirection.Input, 0, 0, "VIPLevel", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@CardID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "CardID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_VIPID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "VIPID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@VIPID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "VIPID", DataRowVersion.Current, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[5];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT VIPID, SalerID, UserID, PresentPoint, TransCount, TransMoney, PresentExp, \r\n      VIPLevel, CardID\r\nFROM HLShop_VIP";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "SELECT CardID, PresentExp, PresentPoint, SalerID, TransCount, TransMoney, UserID, VIPID, VIPLevel FROM HLShop_VIP WHERE (VIPID = @VIPID)";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@VIPID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "VIPID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "PR_GetVIPBySalerIDShopNameUserNameNickNameLevel";
			this._commandCollection[2].CommandType = CommandType.StoredProcedure;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@ShopName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@NickName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@Level", SqlDbType.VarChar, 10, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT CardID, PresentExp, PresentPoint, SalerID, TransCount, TransMoney, UserID, VIPID, VIPLevel FROM HLShop_VIP WHERE (SalerID = @SalerID) AND (UserID = @userid)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "PR_GetVIPByUserIDShopNameSalerNameNickNameLevel";
			this._commandCollection[4].CommandType = CommandType.StoredProcedure;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@ShopName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@NickName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@Level", SqlDbType.VarChar, 10, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_VIP.HLShop_VIPDataTable GetAllVIP()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_VIP.HLShop_VIPDataTable hLShop_VIPDataTable = new S_VIP.HLShop_VIPDataTable();
			this.Adapter.Fill(hLShop_VIPDataTable);
			return hLShop_VIPDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_VIP.HLShop_VIPDataTable GetSingleVIPCard(int VIPID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[1];
			this.Adapter.SelectCommand.Parameters[0].Value = VIPID;
			S_VIP.HLShop_VIPDataTable hLShop_VIPDataTable = new S_VIP.HLShop_VIPDataTable();
			this.Adapter.Fill(hLShop_VIPDataTable);
			return hLShop_VIPDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_VIP.HLShop_VIPDataTable GetVIPBySalerIDShopNameUserNameNickNameLevel(int? SalerID, string ShopName, string NickName, string Level)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (SalerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = SalerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (ShopName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = ShopName;
			}
			if (NickName == null)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = NickName;
			}
			if (Level == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = Level;
			}
			S_VIP.HLShop_VIPDataTable hLShop_VIPDataTable = new S_VIP.HLShop_VIPDataTable();
			this.Adapter.Fill(hLShop_VIPDataTable);
			return hLShop_VIPDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_VIP.HLShop_VIPDataTable GetVIPBySaleridUserID(int SalerID, int userid)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			this.Adapter.SelectCommand.Parameters[0].Value = SalerID;
			this.Adapter.SelectCommand.Parameters[1].Value = userid;
			S_VIP.HLShop_VIPDataTable hLShop_VIPDataTable = new S_VIP.HLShop_VIPDataTable();
			this.Adapter.Fill(hLShop_VIPDataTable);
			return hLShop_VIPDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_VIP.HLShop_VIPDataTable GetVIPByUserIDShopNameNickNameLevel(int? UserID, string ShopName, string NickName, string Level)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (ShopName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = ShopName;
			}
			if (NickName == null)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = NickName;
			}
			if (Level == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = Level;
			}
			S_VIP.HLShop_VIPDataTable hLShop_VIPDataTable = new S_VIP.HLShop_VIPDataTable();
			this.Adapter.Fill(hLShop_VIPDataTable);
			return hLShop_VIPDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_VIP.HLShop_VIPDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_VIP dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_VIP");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Delete(int Original_VIPID)
		{
			this.Adapter.DeleteCommand.Parameters[0].Value = Original_VIPID;
			ConnectionState state = this.Adapter.DeleteCommand.Connection.State;
			if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.DeleteCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.DeleteCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.DeleteCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Insert(int SalerID, int UserID, int? PresentPoint, int? TransCount, decimal? TransMoney, int? PresentExp, string VIPLevel, int? CardID)
		{
			this.Adapter.InsertCommand.Parameters[0].Value = SalerID;
			this.Adapter.InsertCommand.Parameters[1].Value = UserID;
			if (PresentPoint.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[2].Value = PresentPoint.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (TransCount.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[3].Value = TransCount.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (TransMoney.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[4].Value = TransMoney.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (PresentExp.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[5].Value = PresentExp.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (VIPLevel == null)
			{
				this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[6].Value = VIPLevel;
			}
			if (CardID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[7].Value = CardID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
			}
			ConnectionState state = this.Adapter.InsertCommand.Connection.State;
			if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.InsertCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.InsertCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.InsertCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(int SalerID, int UserID, int? PresentPoint, int? TransCount, decimal? TransMoney, int? PresentExp, string VIPLevel, int? CardID, int Original_VIPID, int VIPID)
		{
			this.Adapter.UpdateCommand.Parameters[0].Value = SalerID;
			this.Adapter.UpdateCommand.Parameters[1].Value = UserID;
			if (PresentPoint.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = PresentPoint.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (TransCount.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = TransCount.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (TransMoney.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = TransMoney.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (PresentExp.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = PresentExp.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (VIPLevel == null)
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = VIPLevel;
			}
			if (CardID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = CardID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[8].Value = Original_VIPID;
			this.Adapter.UpdateCommand.Parameters[9].Value = VIPID;
			ConnectionState state = this.Adapter.UpdateCommand.Connection.State;
			if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.UpdateCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.UpdateCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.UpdateCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
